<?php
/**
 * Routes configuration
 *
 * In this file, you set up routes to your controllers and their actions.
 * Routes are very important mechanism that allows you to freely connect
 * different urls to chosen controllers and their actions (functions).
 *
 * PHP 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       app.Config
 * @since         CakePHP(tm) v 0.2.9
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */
/**
 * Here, we are connecting '/' (base path) to controller called 'Pages',
 * its action called 'display', and we pass a param to select the view file
 * to use (in this case, /app/View/Pages/home.ctp)...
 */
	Router::parseExtensions('rss');
	
	Router::connect('/', array('controller' => 'pages', 'action' => 'display', 'index'));
	Router::connect('/admin', array('controller' => 'pages', 'action' => 'display','admin'));
	
	Router::connect('/kontakt', array('plugin' => 'Contactform', 'controller' => 'contactform', 'action' => 'show'));
	Router::connect('/mapastrony', array('plugin' => false, 'controller' => 'menuses', 'action' => 'maps'));
	
	Router::connect('/update/domain/*', array('plugin'=>false, 'controller' => 'update', 'action' => 'domain'));

	Router::connect('/sitemap/index', array('plugin'=>'sitemap', 'controller' => 'sitemap', 'action' => 'index'));
	
	Router::connect('/a/*', array('plugin'=>false, 'controller' => 'articles', 'action' => 'display'));
	Router::connect('/review/*', array('plugin'=>'article', 'controller' => 'article', 'action' => 'review'));

	Router::connect('/galeria/:slug/*', array('plugin'=>false,'controller' => 'galleries','action'=>'index'),array('slug'=>'[A-Z,a-z,0-9-_]+'));
 	Router::connect('/galerie/:kategoria/*', array('plugin'=>false,'controller' => 'galleries','action'=>'index'),array('kategoria'=>'[A-Z,a-z,0-9-_]+'));
	Router::connect('/galeria/*',	array('controller'=>'galleries','action'=>'index'));
	
	Router::connect('/movies',	array('controller'=>'movies','action'=>'index'));
	
	Router::connect('/download/:file/*',	array('controller'=>'download','action'=>'download'));
		
	Router::connect('/prowadzacy/admin/*',	array('controller'=>'prowadzacy','action'=>'admin'));
	Router::connect('/prowadzacy/add/*',	array('controller'=>'prowadzacy','action'=>'add'));
	Router::connect('/prowadzacy/edit/*',	array('controller'=>'prowadzacy','action'=>'edit'));
	Router::connect('/prowadzacy/delete/*',	array('controller'=>'prowadzacy','action'=>'delete'));
	Router::connect('/prowadzacy/view/*',	array('controller'=>'prowadzacy','action'=>'view'));
	Router::connect('/prowadzacy/:slug/*', array('plugin'=>false,'controller' => 'prowadzacy','action'=>'display'),array('slug'=>'[A-Z,a-z,0-9-_]+'));	
	Router::connect('/prowadzacy/*',	array('controller'=>'prowadzacy'));
	
	
	Router::connect('/:controller/:action/*', array());
	Router::connect('/*', array('controller' => 'pages', 'action' => 'display'));


/**
 * Load all plugin routes.  See the CakePlugin documentation on
 * how to customize the loading of plugin routes.
 */
	CakePlugin::routes();

/**
 * Load the CakePHP default routes. Only remove this if you do not want to use
 * the built-in default routes.
 */
	require CAKE . 'Config' . DS . 'routes.php';
